package com.abc.entity;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
/**
*
*  @author luo
*/
public class Example implements Serializable {

    private static final long serialVersionUID = 1545194085896L;


    /**
    * 主键
    * 
    * isNullAble:0
    */
    private Integer id;

    /**
    * 
    * isNullAble:1
    */
    private String name;

    /**
    * 
    * isNullAble:1
    */
    private Integer banner;

    /**
    * 
    * isNullAble:1
    */
    private String richText;

    /**
    * 
    * isNullAble:1
    */
    private String lowerCase;

    /**
    * 
    * isNullAble:1,defaultVal:1
    */
    private Integer order;

    /**
    * 
    * isNullAble:1,defaultVal:1
    */
    private Integer type;

    /**
    * 
    * isNullAble:1,defaultVal:1
    */
    private Integer size;

    /**
    * 
    * isNullAble:1
    */
    private String banner2;

    /**
    * 
    * isNullAble:1,defaultVal:0
    */
    private Integer top;


    public void setId(Integer id){this.id = id;}

    public Integer getId(){return this.id;}

    public void setName(String name){this.name = name;}

    public String getName(){return this.name;}

    public void setBanner(Integer banner){this.banner = banner;}

    public Integer getBanner(){return this.banner;}

    public void setRichText(String richText){this.richText = richText;}

    public String getRichText(){return this.richText;}

    public void setLowerCase(String lowerCase){this.lowerCase = lowerCase;}

    public String getLowerCase(){return this.lowerCase;}

    public void setOrder(Integer order){this.order = order;}

    public Integer getOrder(){return this.order;}

    public void setType(Integer type){this.type = type;}

    public Integer getType(){return this.type;}

    public void setSize(Integer size){this.size = size;}

    public Integer getSize(){return this.size;}

    public void setBanner2(String banner2){this.banner2 = banner2;}

    public String getBanner2(){return this.banner2;}

    public void setTop(Integer top){this.top = top;}

    public Integer getTop(){return this.top;}
    @Override
    public String toString() {
        return "Example{" +
                "id='" + id + '\'' +
                "name='" + name + '\'' +
                "banner='" + banner + '\'' +
                "richText='" + richText + '\'' +
                "lowerCase='" + lowerCase + '\'' +
                "order='" + order + '\'' +
                "type='" + type + '\'' +
                "size='" + size + '\'' +
                "banner2='" + banner2 + '\'' +
                "top='" + top + '\'' +
            '}';
    }

    public static Builder Build(){return new Builder();}

    public static ConditionBuilder ConditionBuild(){return new ConditionBuilder();}

    public static UpdateBuilder UpdateBuild(){return new UpdateBuilder();}

    public static QueryBuilder QueryBuild(){return new QueryBuilder();}

    public static class UpdateBuilder {

        private Example set;

        private ConditionBuilder where;

        public UpdateBuilder set(Example set){
            this.set = set;
            return this;
        }

        public Example getSet(){
            return this.set;
        }

        public UpdateBuilder where(ConditionBuilder where){
            this.where = where;
            return this;
        }

        public ConditionBuilder getWhere(){
            return this.where;
        }

        public UpdateBuilder build(){
            return this;
        }
    }

    public static class QueryBuilder extends Example{
        /**
        * 需要返回的列
        */
        private Map<String,Object> fetchFields;

        public Map<String,Object> getFetchFields(){return this.fetchFields;}

        private List<Integer> idList;

        public List<Integer> getIdList(){return this.idList;}

        private Integer idSt;

        private Integer idEd;

        public Integer getIdSt(){return this.idSt;}

        public Integer getIdEd(){return this.idEd;}

        private List<String> nameList;

        public List<String> getNameList(){return this.nameList;}


        private List<String> fuzzyName;

        public List<String> getFuzzyName(){return this.fuzzyName;}

        private List<String> rightFuzzyName;

        public List<String> getRightFuzzyName(){return this.rightFuzzyName;}
        private List<Integer> bannerList;

        public List<Integer> getBannerList(){return this.bannerList;}

        private Integer bannerSt;

        private Integer bannerEd;

        public Integer getBannerSt(){return this.bannerSt;}

        public Integer getBannerEd(){return this.bannerEd;}

        private List<String> richTextList;

        public List<String> getRichTextList(){return this.richTextList;}


        private List<String> fuzzyRichText;

        public List<String> getFuzzyRichText(){return this.fuzzyRichText;}

        private List<String> rightFuzzyRichText;

        public List<String> getRightFuzzyRichText(){return this.rightFuzzyRichText;}
        private List<String> lowerCaseList;

        public List<String> getLowerCaseList(){return this.lowerCaseList;}


        private List<String> fuzzyLowerCase;

        public List<String> getFuzzyLowerCase(){return this.fuzzyLowerCase;}

        private List<String> rightFuzzyLowerCase;

        public List<String> getRightFuzzyLowerCase(){return this.rightFuzzyLowerCase;}
        private List<Integer> orderList;

        public List<Integer> getOrderList(){return this.orderList;}

        private Integer orderSt;

        private Integer orderEd;

        public Integer getOrderSt(){return this.orderSt;}

        public Integer getOrderEd(){return this.orderEd;}

        private List<Integer> typeList;

        public List<Integer> getTypeList(){return this.typeList;}

        private Integer typeSt;

        private Integer typeEd;

        public Integer getTypeSt(){return this.typeSt;}

        public Integer getTypeEd(){return this.typeEd;}

        private List<Integer> sizeList;

        public List<Integer> getSizeList(){return this.sizeList;}

        private Integer sizeSt;

        private Integer sizeEd;

        public Integer getSizeSt(){return this.sizeSt;}

        public Integer getSizeEd(){return this.sizeEd;}

        private List<String> banner2List;

        public List<String> getBanner2List(){return this.banner2List;}


        private List<String> fuzzyBanner2;

        public List<String> getFuzzyBanner2(){return this.fuzzyBanner2;}

        private List<String> rightFuzzyBanner2;

        public List<String> getRightFuzzyBanner2(){return this.rightFuzzyBanner2;}
        private List<Integer> topList;

        public List<Integer> getTopList(){return this.topList;}

        private Integer topSt;

        private Integer topEd;

        public Integer getTopSt(){return this.topSt;}

        public Integer getTopEd(){return this.topEd;}

        private QueryBuilder (){
            this.fetchFields = new HashMap<>();
        }

        public QueryBuilder idBetWeen(Integer idSt,Integer idEd){
            this.idSt = idSt;
            this.idEd = idEd;
            return this;
        }

        public QueryBuilder idGreaterEqThan(Integer idSt){
            this.idSt = idSt;
            return this;
        }
        public QueryBuilder idLessEqThan(Integer idEd){
            this.idEd = idEd;
            return this;
        }


        public QueryBuilder id(Integer id){
            setId(id);
            return this;
        }

        public QueryBuilder idList(Integer ... id){
            this.idList = solveNullList(id);
            return this;
        }

        public QueryBuilder idList(List<Integer> id){
            this.idList = id;
            return this;
        }

        public QueryBuilder fetchId(){
            setFetchFields("fetchFields","id");
            return this;
        }

        public QueryBuilder excludeId(){
            setFetchFields("excludeFields","id");
            return this;
        }

        public QueryBuilder fuzzyName (List<String> fuzzyName){
            this.fuzzyName = fuzzyName;
            return this;
        }

        public QueryBuilder fuzzyName (String ... fuzzyName){
            this.fuzzyName = solveNullList(fuzzyName);
            return this;
        }

        public QueryBuilder rightFuzzyName (List<String> rightFuzzyName){
            this.rightFuzzyName = rightFuzzyName;
            return this;
        }

        public QueryBuilder rightFuzzyName (String ... rightFuzzyName){
            this.rightFuzzyName = solveNullList(rightFuzzyName);
            return this;
        }

        public QueryBuilder name(String name){
            setName(name);
            return this;
        }

        public QueryBuilder nameList(String ... name){
            this.nameList = solveNullList(name);
            return this;
        }

        public QueryBuilder nameList(List<String> name){
            this.nameList = name;
            return this;
        }

        public QueryBuilder fetchName(){
            setFetchFields("fetchFields","name");
            return this;
        }

        public QueryBuilder excludeName(){
            setFetchFields("excludeFields","name");
            return this;
        }

        public QueryBuilder bannerBetWeen(Integer bannerSt,Integer bannerEd){
            this.bannerSt = bannerSt;
            this.bannerEd = bannerEd;
            return this;
        }

        public QueryBuilder bannerGreaterEqThan(Integer bannerSt){
            this.bannerSt = bannerSt;
            return this;
        }
        public QueryBuilder bannerLessEqThan(Integer bannerEd){
            this.bannerEd = bannerEd;
            return this;
        }


        public QueryBuilder banner(Integer banner){
            setBanner(banner);
            return this;
        }

        public QueryBuilder bannerList(Integer ... banner){
            this.bannerList = solveNullList(banner);
            return this;
        }

        public QueryBuilder bannerList(List<Integer> banner){
            this.bannerList = banner;
            return this;
        }

        public QueryBuilder fetchBanner(){
            setFetchFields("fetchFields","banner");
            return this;
        }

        public QueryBuilder excludeBanner(){
            setFetchFields("excludeFields","banner");
            return this;
        }

        public QueryBuilder fuzzyRichText (List<String> fuzzyRichText){
            this.fuzzyRichText = fuzzyRichText;
            return this;
        }

        public QueryBuilder fuzzyRichText (String ... fuzzyRichText){
            this.fuzzyRichText = solveNullList(fuzzyRichText);
            return this;
        }

        public QueryBuilder rightFuzzyRichText (List<String> rightFuzzyRichText){
            this.rightFuzzyRichText = rightFuzzyRichText;
            return this;
        }

        public QueryBuilder rightFuzzyRichText (String ... rightFuzzyRichText){
            this.rightFuzzyRichText = solveNullList(rightFuzzyRichText);
            return this;
        }

        public QueryBuilder richText(String richText){
            setRichText(richText);
            return this;
        }

        public QueryBuilder richTextList(String ... richText){
            this.richTextList = solveNullList(richText);
            return this;
        }

        public QueryBuilder richTextList(List<String> richText){
            this.richTextList = richText;
            return this;
        }

        public QueryBuilder fetchRichText(){
            setFetchFields("fetchFields","richText");
            return this;
        }

        public QueryBuilder excludeRichText(){
            setFetchFields("excludeFields","richText");
            return this;
        }

        public QueryBuilder fuzzyLowerCase (List<String> fuzzyLowerCase){
            this.fuzzyLowerCase = fuzzyLowerCase;
            return this;
        }

        public QueryBuilder fuzzyLowerCase (String ... fuzzyLowerCase){
            this.fuzzyLowerCase = solveNullList(fuzzyLowerCase);
            return this;
        }

        public QueryBuilder rightFuzzyLowerCase (List<String> rightFuzzyLowerCase){
            this.rightFuzzyLowerCase = rightFuzzyLowerCase;
            return this;
        }

        public QueryBuilder rightFuzzyLowerCase (String ... rightFuzzyLowerCase){
            this.rightFuzzyLowerCase = solveNullList(rightFuzzyLowerCase);
            return this;
        }

        public QueryBuilder lowerCase(String lowerCase){
            setLowerCase(lowerCase);
            return this;
        }

        public QueryBuilder lowerCaseList(String ... lowerCase){
            this.lowerCaseList = solveNullList(lowerCase);
            return this;
        }

        public QueryBuilder lowerCaseList(List<String> lowerCase){
            this.lowerCaseList = lowerCase;
            return this;
        }

        public QueryBuilder fetchLowerCase(){
            setFetchFields("fetchFields","lowerCase");
            return this;
        }

        public QueryBuilder excludeLowerCase(){
            setFetchFields("excludeFields","lowerCase");
            return this;
        }

        public QueryBuilder orderBetWeen(Integer orderSt,Integer orderEd){
            this.orderSt = orderSt;
            this.orderEd = orderEd;
            return this;
        }

        public QueryBuilder orderGreaterEqThan(Integer orderSt){
            this.orderSt = orderSt;
            return this;
        }
        public QueryBuilder orderLessEqThan(Integer orderEd){
            this.orderEd = orderEd;
            return this;
        }


        public QueryBuilder order(Integer order){
            setOrder(order);
            return this;
        }

        public QueryBuilder orderList(Integer ... order){
            this.orderList = solveNullList(order);
            return this;
        }

        public QueryBuilder orderList(List<Integer> order){
            this.orderList = order;
            return this;
        }

        public QueryBuilder fetchOrder(){
            setFetchFields("fetchFields","order");
            return this;
        }

        public QueryBuilder excludeOrder(){
            setFetchFields("excludeFields","order");
            return this;
        }

        public QueryBuilder typeBetWeen(Integer typeSt,Integer typeEd){
            this.typeSt = typeSt;
            this.typeEd = typeEd;
            return this;
        }

        public QueryBuilder typeGreaterEqThan(Integer typeSt){
            this.typeSt = typeSt;
            return this;
        }
        public QueryBuilder typeLessEqThan(Integer typeEd){
            this.typeEd = typeEd;
            return this;
        }


        public QueryBuilder type(Integer type){
            setType(type);
            return this;
        }

        public QueryBuilder typeList(Integer ... type){
            this.typeList = solveNullList(type);
            return this;
        }

        public QueryBuilder typeList(List<Integer> type){
            this.typeList = type;
            return this;
        }

        public QueryBuilder fetchType(){
            setFetchFields("fetchFields","type");
            return this;
        }

        public QueryBuilder excludeType(){
            setFetchFields("excludeFields","type");
            return this;
        }

        public QueryBuilder sizeBetWeen(Integer sizeSt,Integer sizeEd){
            this.sizeSt = sizeSt;
            this.sizeEd = sizeEd;
            return this;
        }

        public QueryBuilder sizeGreaterEqThan(Integer sizeSt){
            this.sizeSt = sizeSt;
            return this;
        }
        public QueryBuilder sizeLessEqThan(Integer sizeEd){
            this.sizeEd = sizeEd;
            return this;
        }


        public QueryBuilder size(Integer size){
            setSize(size);
            return this;
        }

        public QueryBuilder sizeList(Integer ... size){
            this.sizeList = solveNullList(size);
            return this;
        }

        public QueryBuilder sizeList(List<Integer> size){
            this.sizeList = size;
            return this;
        }

        public QueryBuilder fetchSize(){
            setFetchFields("fetchFields","size");
            return this;
        }

        public QueryBuilder excludeSize(){
            setFetchFields("excludeFields","size");
            return this;
        }

        public QueryBuilder fuzzyBanner2 (List<String> fuzzyBanner2){
            this.fuzzyBanner2 = fuzzyBanner2;
            return this;
        }

        public QueryBuilder fuzzyBanner2 (String ... fuzzyBanner2){
            this.fuzzyBanner2 = solveNullList(fuzzyBanner2);
            return this;
        }

        public QueryBuilder rightFuzzyBanner2 (List<String> rightFuzzyBanner2){
            this.rightFuzzyBanner2 = rightFuzzyBanner2;
            return this;
        }

        public QueryBuilder rightFuzzyBanner2 (String ... rightFuzzyBanner2){
            this.rightFuzzyBanner2 = solveNullList(rightFuzzyBanner2);
            return this;
        }

        public QueryBuilder banner2(String banner2){
            setBanner2(banner2);
            return this;
        }

        public QueryBuilder banner2List(String ... banner2){
            this.banner2List = solveNullList(banner2);
            return this;
        }

        public QueryBuilder banner2List(List<String> banner2){
            this.banner2List = banner2;
            return this;
        }

        public QueryBuilder fetchBanner2(){
            setFetchFields("fetchFields","banner2");
            return this;
        }

        public QueryBuilder excludeBanner2(){
            setFetchFields("excludeFields","banner2");
            return this;
        }

        public QueryBuilder topBetWeen(Integer topSt,Integer topEd){
            this.topSt = topSt;
            this.topEd = topEd;
            return this;
        }

        public QueryBuilder topGreaterEqThan(Integer topSt){
            this.topSt = topSt;
            return this;
        }
        public QueryBuilder topLessEqThan(Integer topEd){
            this.topEd = topEd;
            return this;
        }


        public QueryBuilder top(Integer top){
            setTop(top);
            return this;
        }

        public QueryBuilder topList(Integer ... top){
            this.topList = solveNullList(top);
            return this;
        }

        public QueryBuilder topList(List<Integer> top){
            this.topList = top;
            return this;
        }

        public QueryBuilder fetchTop(){
            setFetchFields("fetchFields","top");
            return this;
        }

        public QueryBuilder excludeTop(){
            setFetchFields("excludeFields","top");
            return this;
        }
        private <T>List<T> solveNullList(T ... objs){
            if (objs != null){
            List<T> list = new ArrayList<>();
                for (T item : objs){
                    if (item != null){
                        list.add(item);
                    }
                }
                return list;
            }
            return null;
        }

        public QueryBuilder fetchAll(){
            this.fetchFields.put("AllFields",true);
            return this;
        }

        public QueryBuilder addField(String ... fields){
            List<String> list = new ArrayList<>();
            if (fields != null){
                for (String field : fields){
                    list.add(field);
                }
            }
            this.fetchFields.put("otherFields",list);
            return this;
        }
        @SuppressWarnings("unchecked")
        private void setFetchFields(String key,String val){
            Map<String,Boolean> fields= (Map<String, Boolean>) this.fetchFields.get(key);
            if (fields == null){
                fields = new HashMap<>();
            }
            fields.put(val,true);
            this.fetchFields.put(key,fields);
        }

        public Example build(){return this;}
    }


    public static class ConditionBuilder{
        private List<Integer> idList;

        public List<Integer> getIdList(){return this.idList;}

        private Integer idSt;

        private Integer idEd;

        public Integer getIdSt(){return this.idSt;}

        public Integer getIdEd(){return this.idEd;}

        private List<String> nameList;

        public List<String> getNameList(){return this.nameList;}


        private List<String> fuzzyName;

        public List<String> getFuzzyName(){return this.fuzzyName;}

        private List<String> rightFuzzyName;

        public List<String> getRightFuzzyName(){return this.rightFuzzyName;}
        private List<Integer> bannerList;

        public List<Integer> getBannerList(){return this.bannerList;}

        private Integer bannerSt;

        private Integer bannerEd;

        public Integer getBannerSt(){return this.bannerSt;}

        public Integer getBannerEd(){return this.bannerEd;}

        private List<String> richTextList;

        public List<String> getRichTextList(){return this.richTextList;}


        private List<String> fuzzyRichText;

        public List<String> getFuzzyRichText(){return this.fuzzyRichText;}

        private List<String> rightFuzzyRichText;

        public List<String> getRightFuzzyRichText(){return this.rightFuzzyRichText;}
        private List<String> lowerCaseList;

        public List<String> getLowerCaseList(){return this.lowerCaseList;}


        private List<String> fuzzyLowerCase;

        public List<String> getFuzzyLowerCase(){return this.fuzzyLowerCase;}

        private List<String> rightFuzzyLowerCase;

        public List<String> getRightFuzzyLowerCase(){return this.rightFuzzyLowerCase;}
        private List<Integer> orderList;

        public List<Integer> getOrderList(){return this.orderList;}

        private Integer orderSt;

        private Integer orderEd;

        public Integer getOrderSt(){return this.orderSt;}

        public Integer getOrderEd(){return this.orderEd;}

        private List<Integer> typeList;

        public List<Integer> getTypeList(){return this.typeList;}

        private Integer typeSt;

        private Integer typeEd;

        public Integer getTypeSt(){return this.typeSt;}

        public Integer getTypeEd(){return this.typeEd;}

        private List<Integer> sizeList;

        public List<Integer> getSizeList(){return this.sizeList;}

        private Integer sizeSt;

        private Integer sizeEd;

        public Integer getSizeSt(){return this.sizeSt;}

        public Integer getSizeEd(){return this.sizeEd;}

        private List<String> banner2List;

        public List<String> getBanner2List(){return this.banner2List;}


        private List<String> fuzzyBanner2;

        public List<String> getFuzzyBanner2(){return this.fuzzyBanner2;}

        private List<String> rightFuzzyBanner2;

        public List<String> getRightFuzzyBanner2(){return this.rightFuzzyBanner2;}
        private List<Integer> topList;

        public List<Integer> getTopList(){return this.topList;}

        private Integer topSt;

        private Integer topEd;

        public Integer getTopSt(){return this.topSt;}

        public Integer getTopEd(){return this.topEd;}


        public ConditionBuilder idBetWeen(Integer idSt,Integer idEd){
            this.idSt = idSt;
            this.idEd = idEd;
            return this;
        }

        public ConditionBuilder idGreaterEqThan(Integer idSt){
            this.idSt = idSt;
            return this;
        }
        public ConditionBuilder idLessEqThan(Integer idEd){
            this.idEd = idEd;
            return this;
        }


        public ConditionBuilder idList(Integer ... id){
            this.idList = solveNullList(id);
            return this;
        }

        public ConditionBuilder idList(List<Integer> id){
            this.idList = id;
            return this;
        }

        public ConditionBuilder fuzzyName (List<String> fuzzyName){
            this.fuzzyName = fuzzyName;
            return this;
        }

        public ConditionBuilder fuzzyName (String ... fuzzyName){
            this.fuzzyName = solveNullList(fuzzyName);
            return this;
        }

        public ConditionBuilder rightFuzzyName (List<String> rightFuzzyName){
            this.rightFuzzyName = rightFuzzyName;
            return this;
        }

        public ConditionBuilder rightFuzzyName (String ... rightFuzzyName){
            this.rightFuzzyName = solveNullList(rightFuzzyName);
            return this;
        }

        public ConditionBuilder nameList(String ... name){
            this.nameList = solveNullList(name);
            return this;
        }

        public ConditionBuilder nameList(List<String> name){
            this.nameList = name;
            return this;
        }

        public ConditionBuilder bannerBetWeen(Integer bannerSt,Integer bannerEd){
            this.bannerSt = bannerSt;
            this.bannerEd = bannerEd;
            return this;
        }

        public ConditionBuilder bannerGreaterEqThan(Integer bannerSt){
            this.bannerSt = bannerSt;
            return this;
        }
        public ConditionBuilder bannerLessEqThan(Integer bannerEd){
            this.bannerEd = bannerEd;
            return this;
        }


        public ConditionBuilder bannerList(Integer ... banner){
            this.bannerList = solveNullList(banner);
            return this;
        }

        public ConditionBuilder bannerList(List<Integer> banner){
            this.bannerList = banner;
            return this;
        }

        public ConditionBuilder fuzzyRichText (List<String> fuzzyRichText){
            this.fuzzyRichText = fuzzyRichText;
            return this;
        }

        public ConditionBuilder fuzzyRichText (String ... fuzzyRichText){
            this.fuzzyRichText = solveNullList(fuzzyRichText);
            return this;
        }

        public ConditionBuilder rightFuzzyRichText (List<String> rightFuzzyRichText){
            this.rightFuzzyRichText = rightFuzzyRichText;
            return this;
        }

        public ConditionBuilder rightFuzzyRichText (String ... rightFuzzyRichText){
            this.rightFuzzyRichText = solveNullList(rightFuzzyRichText);
            return this;
        }

        public ConditionBuilder richTextList(String ... richText){
            this.richTextList = solveNullList(richText);
            return this;
        }

        public ConditionBuilder richTextList(List<String> richText){
            this.richTextList = richText;
            return this;
        }

        public ConditionBuilder fuzzyLowerCase (List<String> fuzzyLowerCase){
            this.fuzzyLowerCase = fuzzyLowerCase;
            return this;
        }

        public ConditionBuilder fuzzyLowerCase (String ... fuzzyLowerCase){
            this.fuzzyLowerCase = solveNullList(fuzzyLowerCase);
            return this;
        }

        public ConditionBuilder rightFuzzyLowerCase (List<String> rightFuzzyLowerCase){
            this.rightFuzzyLowerCase = rightFuzzyLowerCase;
            return this;
        }

        public ConditionBuilder rightFuzzyLowerCase (String ... rightFuzzyLowerCase){
            this.rightFuzzyLowerCase = solveNullList(rightFuzzyLowerCase);
            return this;
        }

        public ConditionBuilder lowerCaseList(String ... lowerCase){
            this.lowerCaseList = solveNullList(lowerCase);
            return this;
        }

        public ConditionBuilder lowerCaseList(List<String> lowerCase){
            this.lowerCaseList = lowerCase;
            return this;
        }

        public ConditionBuilder orderBetWeen(Integer orderSt,Integer orderEd){
            this.orderSt = orderSt;
            this.orderEd = orderEd;
            return this;
        }

        public ConditionBuilder orderGreaterEqThan(Integer orderSt){
            this.orderSt = orderSt;
            return this;
        }
        public ConditionBuilder orderLessEqThan(Integer orderEd){
            this.orderEd = orderEd;
            return this;
        }


        public ConditionBuilder orderList(Integer ... order){
            this.orderList = solveNullList(order);
            return this;
        }

        public ConditionBuilder orderList(List<Integer> order){
            this.orderList = order;
            return this;
        }

        public ConditionBuilder typeBetWeen(Integer typeSt,Integer typeEd){
            this.typeSt = typeSt;
            this.typeEd = typeEd;
            return this;
        }

        public ConditionBuilder typeGreaterEqThan(Integer typeSt){
            this.typeSt = typeSt;
            return this;
        }
        public ConditionBuilder typeLessEqThan(Integer typeEd){
            this.typeEd = typeEd;
            return this;
        }


        public ConditionBuilder typeList(Integer ... type){
            this.typeList = solveNullList(type);
            return this;
        }

        public ConditionBuilder typeList(List<Integer> type){
            this.typeList = type;
            return this;
        }

        public ConditionBuilder sizeBetWeen(Integer sizeSt,Integer sizeEd){
            this.sizeSt = sizeSt;
            this.sizeEd = sizeEd;
            return this;
        }

        public ConditionBuilder sizeGreaterEqThan(Integer sizeSt){
            this.sizeSt = sizeSt;
            return this;
        }
        public ConditionBuilder sizeLessEqThan(Integer sizeEd){
            this.sizeEd = sizeEd;
            return this;
        }


        public ConditionBuilder sizeList(Integer ... size){
            this.sizeList = solveNullList(size);
            return this;
        }

        public ConditionBuilder sizeList(List<Integer> size){
            this.sizeList = size;
            return this;
        }

        public ConditionBuilder fuzzyBanner2 (List<String> fuzzyBanner2){
            this.fuzzyBanner2 = fuzzyBanner2;
            return this;
        }

        public ConditionBuilder fuzzyBanner2 (String ... fuzzyBanner2){
            this.fuzzyBanner2 = solveNullList(fuzzyBanner2);
            return this;
        }

        public ConditionBuilder rightFuzzyBanner2 (List<String> rightFuzzyBanner2){
            this.rightFuzzyBanner2 = rightFuzzyBanner2;
            return this;
        }

        public ConditionBuilder rightFuzzyBanner2 (String ... rightFuzzyBanner2){
            this.rightFuzzyBanner2 = solveNullList(rightFuzzyBanner2);
            return this;
        }

        public ConditionBuilder banner2List(String ... banner2){
            this.banner2List = solveNullList(banner2);
            return this;
        }

        public ConditionBuilder banner2List(List<String> banner2){
            this.banner2List = banner2;
            return this;
        }

        public ConditionBuilder topBetWeen(Integer topSt,Integer topEd){
            this.topSt = topSt;
            this.topEd = topEd;
            return this;
        }

        public ConditionBuilder topGreaterEqThan(Integer topSt){
            this.topSt = topSt;
            return this;
        }
        public ConditionBuilder topLessEqThan(Integer topEd){
            this.topEd = topEd;
            return this;
        }


        public ConditionBuilder topList(Integer ... top){
            this.topList = solveNullList(top);
            return this;
        }

        public ConditionBuilder topList(List<Integer> top){
            this.topList = top;
            return this;
        }

        private <T>List<T> solveNullList(T ... objs){
            if (objs != null){
            List<T> list = new ArrayList<>();
                for (T item : objs){
                    if (item != null){
                        list.add(item);
                    }
                }
                return list;
            }
            return null;
        }

        public ConditionBuilder build(){return this;}
    }

    public static class Builder {

        private Example obj;

        public Builder(){
            this.obj = new Example();
        }

        public Builder id(Integer id){
            this.obj.setId(id);
            return this;
        }
        public Builder name(String name){
            this.obj.setName(name);
            return this;
        }
        public Builder banner(Integer banner){
            this.obj.setBanner(banner);
            return this;
        }
        public Builder richText(String richText){
            this.obj.setRichText(richText);
            return this;
        }
        public Builder lowerCase(String lowerCase){
            this.obj.setLowerCase(lowerCase);
            return this;
        }
        public Builder order(Integer order){
            this.obj.setOrder(order);
            return this;
        }
        public Builder type(Integer type){
            this.obj.setType(type);
            return this;
        }
        public Builder size(Integer size){
            this.obj.setSize(size);
            return this;
        }
        public Builder banner2(String banner2){
            this.obj.setBanner2(banner2);
            return this;
        }
        public Builder top(Integer top){
            this.obj.setTop(top);
            return this;
        }
        public Example build(){return obj;}
    }

}
